# -*- coding: utf-8 -*-
# @Time    : 2021/3/19 16:52
# @Author  : mokez
# @Email   : 1569089678@qq.com
# @File    : 根据分数定等级.py
# @Software: PyCharm
while 1:
    user_num = input("请输入0-100之间的数字：（按q退出）")
    if user_num == 'q' or user_num == 'Q':
        print("退出了")
        break
    try:
        user_num = int(user_num)
        if user_num<0 or user_num>100:
            print("输错了！！")
            continue
    except ValueError:
        print("您输入的不是数字，请重新输入")
        continue
    if 85<=user_num<=100:
        print("优秀")
    elif 60<=user_num<85:
        print("良好")
    elif 0<=user_num<60:
        print("不及格")

